package com.jzg.sys.manager;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
import com.jzg.sys.api.sec.ResourceService;
import com.jzg.sys.dao.entity.SecResource;
import com.jzg.sys.dao.mapper.SecResourceMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
    * 资源 服务实现类
    * </p>
 *
 * @author lzp
 * @since 2019-02-22
 */
@Service
public class SecResourceManager extends ServiceImpl<SecResourceMapper, SecResource>  implements ResourceService {

    @Resource
    private SecResourceMapper resourceMapper;

    public List<SecResource> getAll(String sysCode) {
        return resourceMapper.selectList(new LambdaQueryWrapper<SecResource>()
                .eq(SecResource::getSysCode,sysCode)
        );
    }
}
